const express = require('express')
const cookieParse = require('cookie-parser')

const app = express()

app.use(cookieParse('ljp'))
app.get('/read', function (req, res) {
    console.log(req)
    res.send(req.signedCookies.name)
})

app.get('/write', function (req, res) {
    res.cookie('name', 'ljp', { signed: true })
    res.send('写入成功')
})



app.listen(3000, function () {
    console.log('server start')
})
